package com.zhongnan.demo6.queue;

import com.zhongnan.demo6.shengchanxiaofei.Desk;

import java.util.concurrent.ArrayBlockingQueue;

public class Foodie extends Thread{
    private ArrayBlockingQueue<String> abq;

    public Foodie(ArrayBlockingQueue<String> abq) {
        this.abq = abq;
    }

    @Override
    public void run() {
        while (true) {
            try {
                System.out.println(abq.take());
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
